package com.imooc.girl.util;

import com.imooc.girl.domain.ReturnResult;

import java.util.Map;

public class ReturnResultUtil {
    public static ReturnResult getSuccess(Map<Object,Object> data,String message){
        ReturnResult result=new ReturnResult();
        result.setStatus(0);
        result.setMessage(message);
        result.setData(data);
        return result;
    }

    public static ReturnResult getError(String message){
        ReturnResult result=new ReturnResult();
        result.setStatus(1);
        result.setMessage(message);
        return result;
    }
}
